import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import echarts from './views/charts/echarts.vue'
import Department from './views/org/department.vue'
import Employee from './views/org/employee.vue'
import Config from './views/sys/config.vue'
import Dictionary from './views/sys/dictionary.vue'
import Dictionaryitem from './views/sys/dictionaryitem.vue'
import Product from './views/prd/product.vue'
import TypeProduct from './views/prd/typeProduct.vue'
import Activity from './views/market/activity.vue'
import Clue from './views/market/clue.vue'








let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    //{ path: '/main', component: Main },
    {
        path: '/',
        component: Home,
        name: '主页',
        iconCls: 'fa fa-bar-chart',
        leaf: true,//只有一个节点
        children: [
            { path: '/echarts', component: echarts, name: '主页' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '组织机构管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/department', component: Department, name: '部门管理'},
            { path: '/employee', component: Employee, name: '员工管理'},

        ]
    },
    {
        path: '/',
        component: Home,
        name: '系统管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/config', component: Config, name: '系统配置' },
            { path: '/dictionary', component: Dictionary, name: '数据字典' },
            { path: '/dictionaryitem', component: Dictionaryitem, name: '数据明细'}

        ]
    },
    {
        path: '/',
        component: Home,
        name: '产品管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/product', component: Product, name: '产品详细' },
            { path: '/typeProduct', component: TypeProduct, name: '产品类型' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '市场营销',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/activity', component: Activity, name: '市场活动' },
            { path: '/clue', component: Clue, name: '市场线索' },
        ]
    },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;